<?php get_header(); ?>
<div class="teamhead">
    <div class="text">
        <?php query_posts('pagename=section2'); if ( have_posts() ): while ( have_posts() ) : the_post(); ?>
        <h3>
            <?php if(qtrans_getLanguage()=='tw'): ?>
                <?php echo get_post_meta($post->ID, "about_setting_title_tw", $single = true) ?>
            <?php endif; ?>
            <?php if(qtrans_getLanguage()=='en'): ?>
                <?php echo get_post_meta($post->ID, "about_setting_title_en", $single = true) ?>
            <?php endif; ?>
            <?php if(qtrans_getLanguage()=='zh'): ?>
                <?php echo get_post_meta($post->ID, "about_setting_title_cn", $single = true) ?>
            <?php endif; ?>
        </h3>
        <p><?php the_content(''); ?></p>
        <?php endwhile; ?>
        <?php endif; wp_reset_query(); ?>
    </div>
    <div class="teamnumber">
        <img src="<?php asset('statics/img/datasnumber.png'); ?>" alt="">
    </div>
    <div class="teamdatas">
        <img src="<?php asset('statics/img/datas.png'); ?>" alt="">
    </div>
</div>
<div class="container-fluid">
    <div class="row member-box">
        <?php $mypost = array( 'post_type' => 'type_team');$loop = new WP_Query( $mypost ); ?>
        <?php  if ( have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post();?>
        <div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
            <div class="member">
                <div class="material">
                    <h3 class="name"><?php the_title(''); ?></h3>
                    <p class="name-en"><?php echo get_post_meta($post->ID, "team_setting_position", $single = true) ?></p>
                    <p class="job">
                        <?php if(qtrans_getLanguage()=='tw'): ?>
                            <?php echo get_post_meta($post->ID, "team_setting_position_desc_tw", $single = true) ?>
                        <?php endif; ?>
                        <?php if(qtrans_getLanguage()=='zh'): ?>
                            <?php echo get_post_meta($post->ID, "team_setting_position_desc_cn", $single = true) ?>
                        <?php endif; ?>
                    </p>
                </div>
                <div class="person">
                    <img src="<?php the_post_thumbnail_src(''); ?>" alt="<?php the_title(''); ?>">
                </div>
                <div class="text">
                    <p class="show"><?php the_excerpt_without_p(); ?></p>
                    <p class="hidden"><?php the_pure_content(); ?></p>
                </div>
            </div>
        </div>
        <?php endwhile; ?>
        <?php endif; wp_reset_query(); ?>
    </div>
</div>
<div style="text-align: center;margin-bottom: 50px;">
    <p>© 2017 by Cherubic Ventures All rights reserved</p>
</div>
<?php get_footer(); ?>
<script>
    $('.member').hover(function(){
        var that = $(this).children('.text');
        that.finish().animate({'height':'100%'},200);
        that.children('p:eq(0)').removeClass('show').addClass('hidden');
        that.children('p:eq(1)').removeClass('hidden').addClass('show');
    },function(){
        var that = $(this).children('.text');
        that.finish().animate({'height':'50px'},200);
        that.children('p:eq(1)').removeClass('show').addClass('hidden');
        that.children('p:eq(0)').removeClass('hidden').addClass('show');
    })
</script>
</body>
</html>